﻿import QtQuick 2.0

Text {
    id: textScore_
    text: "100"
    font.pointSize: 30
    font.bold: true
    font.family: "微软雅黑"
    z: 12
    color: "white"

    property real tempX: 0
    property real tempY: 0

    ParallelAnimation{
        id: anim
//        PropertyAnimation{target: textScore; property: "x"; to: tempX + 80; duration: 500}
        PropertyAnimation{target: textScore_; property: "y"; to: tempY; duration: 500}

        onStopped: {
            window.score += window.ballScore
            textScore_.destroy()
        }
    }

    function move(){
        tempX = textScore_.x
        tempY = textScore_.y - 30
        console.log("=====",tempY )
        if(anim.running) return
        anim.restart()
    }
}

